<?php
return array(
	'cascade' => array(
		'profile', 'activePrice',
	),
	'formView' => array(
		'fields' => array(
			'profile' => array(
				'id' => false,
				'uid' => false,
				'goods_id' => false,
				'room_type' => array('dropDownList', Yii::app()->enum->options('goods.hotelType')),
				//'hotel_id' => array('dropDownList', Yii::app()->enum->options('goods.companyHotel')),
				'hotel_id' => array(
					'class' => 'HotelCompanyField',
				),
				'has_breakfast' => array('dropDownList', Yii::app()->enum->options('yes2no'), array('id'=>'has_breakfast')),
				'bed_type' => array('dropDownList', Yii::app()->enum->options('goods.bedType')),
				'floor',
				'bed_additional' => array('dropDownList', Yii::app()->enum->options('yes2no')),
				'no_smoking' => array('dropDownList', Yii::app()->enum->options('yes2no')),
				'broadband_type' => array('dropDownList', Yii::app()->enum->options('goods.broadbandType')),
				'bathroom_type' => array('dropDownList', Yii::app()->enum->options('goods.bathroomType')),
				'breakfast_type' => array('dropDownList', Yii::app()->enum->options('goods.breakfastType'), array('id'=>'breakfast_type')),
				'notes' => array('textArea', array('rows'=>'3', 'cols'=>'50')),
				'info' => array('textArea', array('rows'=>'3', 'cols'=>'50')),
				'num' => false,
			),
		)
	),
	
	'scripts' => array(
		array(null, "
		$('#has_breakfast').change(function() {
			if(!this.value || this.value == 0) {
				$('#breakfast_type').val('').parent().parent().hide();
			} else {
				$('#breakfast_type').parent().parent().show();
			}
		});
		")
	),
	
	'_import' => array(
		array('*', 'actions.edit//*'),
		array('formView.fields.*','actions.goods.partials.activePrice//formView.fields.*'),
		array('formView.fields.baseInfo.*', 'actions.goods.edit//formView.fields.baseInfo.*'),
	),
);